~{define "components/jielong_add_success"}~
<!-- 定义模板内容 -->

<style>
    /* #app {
        margin: 0 auto;
    } */

    #app .container {
        max-width: 600px;
        margin: 0 auto;
        padding: 20px;
    }

    #app .container .box-card {
        margin-top: 60px;
    }

    #app .container .box-card .el-result__extra {
        margin-top: 0;
        width: 100%;
    }
</style>
<!-- 加载需要的组件 -->
<template id="template-jielong-add-success">
    <div id="app" v-loading="false">

        <div class="container">

            <el-card class="box-card">
                <el-result icon="success" title="创建成功" :sub-title="jielongItem.Theme">
                    <template slot="extra">
                        <el-divider></el-divider>
                        <div class="center">
                            <p>群接龙链接创建成功，请通过会话发送给同事</p>
                            <el-button type="primary" size="medium" @click="onCopy">复制链接</el-button>
                        </div>
                    </template>
                </el-result>
            </el-card>

        </div>
    </div>
</template>
<script>
    // 定义组件
    Vue.component('jielong-add-success', {
        props: {
            jielongItem: {
                type: Object,
                default: {}
            }
        },
        data: function () {
            return {
                localMessage: 'Hello from My Component!'
            };
        },
        template: '#template-jielong-add-success',
        methods: {
            onCopy() {
                window.makeJielongLink(this.jielongItem);
            }
        }
    })
</script>

~{end}~